<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Assimp: aiTexture Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Assimp
   &#160;<span id="projectnumber">v3.0 (July 2012)</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="structai_texture.html#pub-methods">Public Member Functions</a> &#124;
<a href="structai_texture.html#pub-attribs">Public Attributes</a>  </div>
  <div class="headertitle">
<div class="title">aiTexture Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Helper structure to describe an embedded texture.  
 <a href="structai_texture.html#details">More...</a></p>

<p><a href="structai_texture-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aa61586c37fcd6f5b3c2fb81af78c461e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structai_texture.html#aa61586c37fcd6f5b3c2fb81af78c461e">aiTexture</a> ()</td></tr>
<tr class="memitem:ae062a7b9be8ee7105514f456a0c38322"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structai_texture.html#ae062a7b9be8ee7105514f456a0c38322">CheckFormat</a> (const char *s) const </td></tr>
<tr class="memdesc:ae062a7b9be8ee7105514f456a0c38322"><td class="mdescLeft">&#160;</td><td class="mdescRight">For compressed textures (mHeight == 0): compare the format hint against a given string.  <a href="structai_texture.html#ae062a7b9be8ee7105514f456a0c38322"></a><br/></td></tr>
<tr class="memitem:a4890306b77f90844989f74e6d37e86e6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structai_texture.html#a4890306b77f90844989f74e6d37e86e6">~aiTexture</a> ()</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:aa9f44996acf3b301bfeb4e5348311540"><td class="memItemLeft" align="right" valign="top">char&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structai_texture.html#aa9f44996acf3b301bfeb4e5348311540">achFormatHint</a> [4]</td></tr>
<tr class="memdesc:aa9f44996acf3b301bfeb4e5348311540"><td class="mdescLeft">&#160;</td><td class="mdescRight">A hint from the loader to make it easier for applications to determine the type of embedded compressed textures.  <a href="structai_texture.html#aa9f44996acf3b301bfeb4e5348311540"></a><br/></td></tr>
<tr class="memitem:ac1e2fa6f1f646e9c55e3985d4418a752"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structai_texture.html#ac1e2fa6f1f646e9c55e3985d4418a752">mHeight</a></td></tr>
<tr class="memdesc:ac1e2fa6f1f646e9c55e3985d4418a752"><td class="mdescLeft">&#160;</td><td class="mdescRight">Height of the texture, in pixels.  <a href="structai_texture.html#ac1e2fa6f1f646e9c55e3985d4418a752"></a><br/></td></tr>
<tr class="memitem:aaa3ad8cfe44fdc4dea2db91977d92234"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structai_texture.html#aaa3ad8cfe44fdc4dea2db91977d92234">mWidth</a></td></tr>
<tr class="memdesc:aaa3ad8cfe44fdc4dea2db91977d92234"><td class="mdescLeft">&#160;</td><td class="mdescRight">Width of the texture, in pixels.  <a href="structai_texture.html#aaa3ad8cfe44fdc4dea2db91977d92234"></a><br/></td></tr>
<tr class="memitem:a97dcffdd5651f20605750820dab897a7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structai_texel.html">aiTexel</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structai_texture.html#a97dcffdd5651f20605750820dab897a7">pcData</a></td></tr>
<tr class="memdesc:a97dcffdd5651f20605750820dab897a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Data of the texture.  <a href="structai_texture.html#a97dcffdd5651f20605750820dab897a7"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Helper structure to describe an embedded texture. </p>
<p>Normally textures are contained in external files but some file formats embed them directly in the model file. There are two types of embedded textures:</p>
<ol type="1">
<li>Uncompressed textures. The color data is given in an uncompressed format.</li>
<li>Compressed textures stored in a file format like png or jpg. The raw file bytes are given so the application must utilize an image decoder (e.g. DevIL) to get access to the actual color data. </li>
</ol>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aa61586c37fcd6f5b3c2fb81af78c461e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">aiTexture::aiTexture </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a class="anchor" id="a4890306b77f90844989f74e6d37e86e6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">aiTexture::~aiTexture </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ae062a7b9be8ee7105514f456a0c38322"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool aiTexture::CheckFormat </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>s</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>For compressed textures (mHeight == 0): compare the format hint against a given string. </p>
<dl class="params"><dt>Parameters:</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td>Input string. 3 characters are maximally processed. Example values: "jpg", "png" </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>true if the given string matches the format hint </dd></dl>

</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="aa9f44996acf3b301bfeb4e5348311540"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char aiTexture::achFormatHint[4]</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>A hint from the loader to make it easier for applications to determine the type of embedded compressed textures. </p>
<p>If mHeight != 0 this member is undefined. Otherwise it is set set to '\0\0\0\0' if the loader has no additional information about the texture file format used OR the file extension of the format without a trailing dot. If there are multiple file extensions for a format, the shortest extension is chosen (JPEG maps to 'jpg', not to 'jpeg'). E.g. 'dds\0', 'pcx\0', 'jpg\0'. All characters are lower-case. The fourth character will always be '\0'. </p>

</div>
</div>
<a class="anchor" id="ac1e2fa6f1f646e9c55e3985d4418a752"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int aiTexture::mHeight</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Height of the texture, in pixels. </p>
<p>If this value is zero, pcData points to an compressed texture in any format (e.g. JPEG). </p>

</div>
</div>
<a class="anchor" id="aaa3ad8cfe44fdc4dea2db91977d92234"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int aiTexture::mWidth</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Width of the texture, in pixels. </p>
<p>If mHeight is zero the texture is compressed in a format like JPEG. In this case mWidth specifies the size of the memory area pcData is pointing to, in bytes. </p>

</div>
</div>
<a class="anchor" id="a97dcffdd5651f20605750820dab897a7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structai_texel.html">aiTexel</a>* aiTexture::pcData</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Data of the texture. </p>
<p>Points to an array of mWidth * mHeight <a class="el" href="structai_texel.html" title="Helper structure to represent a texel in a ARGB8888 format.">aiTexel</a>'s. The format of the texture data is always ARGB8888 to make the implementation for user of the library as easy as possible. If mHeight = 0 this is a pointer to a memory buffer of size mWidth containing the compressed texture data. Good luck, have fun! </p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li><a class="el" href="texture_8h.html">texture.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Jul 10 2012 17:55:53 for Assimp by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
